<div class="blazorise-codeblock">
<div class="html"><pre>
<span class="htmlTagDelimiter">&lt;</span><span class="htmlElementName">Button</span> <span class="htmlAttributeName">Color</span><span class="htmlOperator">=</span><span class="quot">&quot;</span><span class="enum">Color</span><span class="enumValue">.Primary</span><span class="quot">&quot;</span> <span class="htmlAttributeName">Clicked</span><span class="htmlOperator">=</span><span class="quot">&quot;</span><span class="htmlAttributeValue">ShowRenderFragment</span><span class="quot">&quot;</span><span class="htmlTagDelimiter">&gt;</span>Show Custom Structure<span class="htmlTagDelimiter">&lt;/</span><span class="htmlElementName">Button</span><span class="htmlTagDelimiter">&gt;</span>
</pre></div>
<div class="csharp"><pre>
<span class="atSign">&#64;</span>code {
    [Inject] <span class="keyword">public</span> IModalService ModalService { <span class="keyword">get</span>; <span class="keyword">set</span>; }

    <span class="keyword">private</span> RenderFragment customFragment =&gt; __builder =&gt;
    {
        &lt;Paragraph&gt;This content <span class="keyword">is</span> provided <span class="keyword">by</span> a custom RenderFragment&lt;/Paragraph&gt;
    };

    <span class="keyword">public</span> Task ShowRenderFragment()
    {
        <span class="keyword">return</span> ModalService.Show( <span class="string">&quot;My Custom RenderFragment!&quot;</span>, customFragment );
    }
}
</pre></div>
</div>
